package com.yiwei.zxp.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.yiwei.zxp.R;
import com.yiwei.zxp.base.BaseActivity;
import com.yiwei.zxp.constant.Const;
import com.yiwei.zxp.util.Util;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created by xsooy-pc on 17-12-8.
 */

public class TestActivity extends BaseActivity {


    @BindView(R.id.btn_real)
    TextView btnReal;
    @BindView(R.id.btn_test)
    TextView btnTest;
    private Unbinder unbiner;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test_app);
        initBar();
        unbiner = ButterKnife.bind(this);
        init();
    }

    private void init() {

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        unbiner.unbind();
        unbiner = null;
    }

    @OnClick({R.id.btn_real, R.id.btn_test})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_real:
                Const.SERVER_API_URL = "http://app.api.yuntaoonline.com";
                Util.startActivity(this, SplashActivity.class);
                finish();
                break;
            case R.id.btn_test:
                Const.SERVER_API_URL = "http://test.app.api.yuntaoonline.com";
                Util.startActivity(this, SplashActivity.class);
                finish();
                break;
        }
    }
}
